package xiaoyang.dao;

import org.apache.ibatis.annotations.Param;
import xiaoyang.pojo.AppInfo;

import java.util.List;

public interface AppInfoMapper {
    /**
     * 管理者显示
     * @param softwareName
     * @param flatformId
     * @param categoryLevel1
     * @param categoryLevel2
     * @param categoryLevel3
     * @param pageIndex
     * @param pageSize
     * @return
     */
    public List<AppInfo> getInfoAll(@Param("softwareName")String softwareName,@Param("flatformId")Integer flatformId,@Param("categoryLevel1") Integer categoryLevel1,@Param("categoryLevel2") Integer categoryLevel2,@Param("categoryLevel3") Integer categoryLevel3,@Param("pageIndex") Integer pageIndex,@Param("pageSize") Integer pageSize);

    /**
     * 管理者数量查询
     * @param softwareName
     * @param flatformId
     * @param categoryLevel1
     * @param categoryLevel2
     * @param categoryLevel3
     * @return
     */
    public int appInfoCount(@Param("softwareName")String softwareName,@Param("flatformId")Integer flatformId,@Param("categoryLevel1") Integer categoryLevel1,@Param("categoryLevel2") Integer categoryLevel2,@Param("categoryLevel3") Integer categoryLevel3);

    /**
     * 开发者显示
     * @param softwareName
     * @param flatformId
     * @param status
     * @param categoryLevel1
     * @param categoryLevel2
     * @param categoryLevel3
     * @return
     */
    public List<AppInfo> getDevInfoAll(@Param("softwareName")String softwareName, @Param("flatformId")Integer flatformId, @Param("status")Integer status,@Param("categoryLevel1") Integer categoryLevel1, @Param("categoryLevel2") Integer categoryLevel2, @Param("categoryLevel3") Integer categoryLevel3);

    /**
     * 新增手游
     * @param appInfo
     * @return
     */
    public boolean appInfoAdd(AppInfo appInfo);

    /**
     * 查询APKName是否存在
     * @param APKName
     * @return
     */
    public AppInfo getApkName(@Param("APKName") String APKName);

    /**
     * 根据id查询
     * @param id
     * @return
     */
    public AppInfo getIdAll(@Param("id") Integer id);

    /**
     * 修改手游信息
     * @param appInfo

     * @return
     */
    public boolean update(AppInfo appInfo);

    public boolean updateVersion(AppInfo appInfo);

    public AppInfo getAppInfoId(@Param("id") Integer id);

    /**
     * 删除手游
     * @param id
     * @return
     */
    public boolean devDel(@Param("id") Integer id);

    /**
     *下架
     * @param id
     * @return
     */
    public  boolean xj(@Param("id") Integer id);

    /**
     * 上架
     * @param id
     * @return
     */
    public  boolean sj(@Param("id") Integer id);

    /**
     * 审核通过
     * @return
     */
    boolean auditPass(@Param("id") Integer id,@Param("version") Integer version);

    /**
     * 审核不通过
     * @return
     */
    boolean auditNoPass(@Param("id") Integer id,@Param("version") Integer version);
    /**
     * 修改审核不通过
     */
    boolean upAuditNoPass(@Param("id") Integer id);

    boolean upImg(@Param("id") Integer id);
}
